from time import sleep

from celery import Celery

app = Celery("tasks")

app.config_from_object("celery_config")


@app.task
def your_task():

    sleep(6)

    print("任务执行结束")
    return "66"


if __name__ == '__main__':
    print("开始")
    your_task.delay()
    print("结束")
